﻿
<div ng-controller="CompanyUserController">
    <form class="relative mt50" name="form " novalidate>
        <button class="mb20 clearfix" ng-click="createNew()">{{texts['btn-create-new']}}</button>

        <div class="fleft UserMaster clearfix">
            <dl class="clearfix" >
                <dt>
                    {{texts['lb-Email']}}
                </dt>
                <dd>
                    <div class="form-group">
                        <input name="email" ng-disabled="emailCheck" type="email" ng-model="user.Email" required validator="[required, requiredBlur]" />
                        <span ng-show="form.email.$error.email" style="color: #FF3300">Email is not correct!</span>
                    </div>
                </dd>
            </dl>
            <dl class="clearfix">
                <dt>
                    {{texts['lb-password']}}
                </dt>
                <dd>
                    <div class="form-group">
                        <input id="userPassword" name="userPassword" type="password" ng-model="user.PassWord" validator="[required, requiredBlur]" />
                    </div>
                </dd>
            </dl>
            <dl class="clearfix">
                <dt>
                    {{texts['lb-confirm-password']}}
                </dt>
                <dd>
                    <div class="form-group">
                        <input name="confirmPassword" type="password" ng-model="confirmPassword" validator="[required, requiredBlur, matchField]" validator-match-with="userPassword" />
                    </div>
                </dd>
            </dl>
            <dl class="clearfix">
                <dt>
                    {{texts['lb-user-name']}}
                </dt>
                <dd>
                    <div class="form-group">
                        <input id="Text4" class="w250" name="userName" type="text" ng-model="user.Name" validator="[required, requiredBlur]" />
                    </div>
                </dd>
            </dl>
            <dl class="clearfix">
                <dt>
                    {{texts['lb-store']}}
                </dt>
                <dd>
                    <p ng-repeat="store in allStores">
                        <label><input type="checkbox" ng-model="store.Checked" /> {{store.StoreName}}</label>
                    </p>
                    <label><input type="checkbox" /> Check all</label>
                </dd>
            </dl>
            <div class="mt30 center clearfix">
                <button class="w110 mr15" ng-click="delete(user.Id, user.CompanyUserId)">{{texts['btn-delete']}}</button>
                <button class="w110" ng-click="save(user.Id, user.CompanyUserId)">{{texts['btn-save']}}</button>
            </div>

        </div>
        <div class="fleft listUserMaster w200 clearfix">
            <p>List User</p>
            <p ng-repeat="rows in userList" ng-click="edit(rows.Id)">{{rows.Name}}</p>
        </div>
    </form>


    <div id="popup-wrapper"></div>
    <div class="popup-delete-save popupEffer clearfix" >
        <p class="popup-titleDelete">{{title}}</p>
        <ul class="popup-listBtn clearfix">
            <li><a ng-click="action()">Yes</a></li>
            <li><a class="b-close">No</a></li>
        </ul>
    </div>
    <div class="popup-exist popupEffer clearfix">
        <p class="popup-titleDelete">{{titleExist}}</p>
        <ul class="popup-listBtn clearfix">
            <li><a class="b-close">OK</a></li>
        </ul>
    </div>


</div>
